#ifndef __DLG_H__
#define __DLG_H__
#include <ui_qtiptv.h>
#include <QSystemTrayIcon>
#include <QCloseEvent>

#define CHANNEL_NUM		38
#define TVLIST_PATH		"/usr/share/qtiptv/misc/tvlist"
#define TRAY_ICON_PATH	"/usr/share/pixmaps/qtiptv.png"

class MyDlg : public QDialog
{
Q_OBJECT
public:
    MyDlg(); 
	QString NameToAddr(QString);
protected:
	void closeEvent(QCloseEvent *event);
public slots:
	void ExecMplayer();
private slots:
	void iconActivated(QSystemTrayIcon::ActivationReason reason);
private:
	void conn();
	void init();

    Ui::Dialog ui;
	QSystemTrayIcon *trayIcon;
	QMenu *trayIconMenu;
	QAction *quitAction;
};
#endif
